<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">



  
  
    
    
  <script src="/dxl/lib/pace/pace.min.js?v=1.0.2"></script>
  <link href="/dxl/lib/pace/pace-theme-minimal.min.css?v=1.0.2" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/dxl/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">







<link href="/dxl/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/dxl/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/dxl/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/dxl/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/dxl/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/dxl/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="数据库,">










<meta name="description" content="一、模块的准备1.1模块的安装1pip3 install pymongo  1.2可能用到的相关模块123from bson import ObjectIdfrom pymongo import MongoClientfrom pymongo.cursor import Cursor  1.3数据库的连接123m_client = MongoClient(&quot;127.0.0.1&quot;,27017)mdb">
<meta name="keywords" content="数据库">
<meta property="og:type" content="article">
<meta property="og:title" content="python操作MongoDB">
<meta property="og:url" content="http://yoursite.com/2019/09/18/【数据库mogodb】python操作mogodb/index.html">
<meta property="og:site_name" content="我的快乐时光">
<meta property="og:description" content="一、模块的准备1.1模块的安装1pip3 install pymongo  1.2可能用到的相关模块123from bson import ObjectIdfrom pymongo import MongoClientfrom pymongo.cursor import Cursor  1.3数据库的连接123m_client = MongoClient(&quot;127.0.0.1&quot;,27017)mdb">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2019-09-18T14:04:51.211Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="python操作MongoDB">
<meta name="twitter:description" content="一、模块的准备1.1模块的安装1pip3 install pymongo  1.2可能用到的相关模块123from bson import ObjectIdfrom pymongo import MongoClientfrom pymongo.cursor import Cursor  1.3数据库的连接123m_client = MongoClient(&quot;127.0.0.1&quot;,27017)mdb">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/dxl/',
    scheme: 'Gemini',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":true,"scrollpercent":true,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2019/09/18/【数据库mogodb】python操作mogodb/">





  <title>python操作MongoDB | 我的快乐时光</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/dxl/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">我的快乐时光</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/dxl/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/dxl/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br>
            
            分类
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/dxl/2019/09/18/【数据库mogodb】python操作mogodb/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content>
      <meta itemprop="description" content>
      <meta itemprop="image" content="/dxl/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="我的快乐时光">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">python操作MongoDB</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2019-09-18T21:39:17+08:00">
                2019-09-18
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/dxl/categories/数据库/" itemprop="url" rel="index">
                    <span itemprop="name">数据库</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/dxl/2019/09/18/【数据库mogodb】python操作mogodb/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count valine-comment-count" data-xid="/dxl/2019/09/18/【数据库mogodb】python操作mogodb/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          
            <span class="post-meta-divider">|</span>
            <span class="page-pv">本文总阅读量
            <span class="busuanzi-value" id="busuanzi_value_page_pv"></span>次
            </span>
          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                <span title="字数统计">
                  
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">
                  
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="一、模块的准备"><a href="#一、模块的准备" class="headerlink" title="一、模块的准备"></a>一、模块的准备</h2><h3 id="1-1模块的安装"><a href="#1-1模块的安装" class="headerlink" title="1.1模块的安装"></a>1.1模块的安装</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pip3 install pymongo</span><br></pre></td></tr></table></figure>

<h3 id="1-2可能用到的相关模块"><a href="#1-2可能用到的相关模块" class="headerlink" title="1.2可能用到的相关模块"></a>1.2可能用到的相关模块</h3><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">from</span> bson <span class="keyword">import</span> ObjectId</span><br><span class="line"><span class="keyword">from</span> pymongo <span class="keyword">import</span> MongoClient</span><br><span class="line"><span class="keyword">from</span> pymongo.cursor <span class="keyword">import</span> Cursor</span><br></pre></td></tr></table></figure>

<h3 id="1-3数据库的连接"><a href="#1-3数据库的连接" class="headerlink" title="1.3数据库的连接"></a>1.3数据库的连接</h3><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">m_client = MongoClient(<span class="string">"127.0.0.1"</span>,<span class="number">27017</span>)</span><br><span class="line"></span><br><span class="line">mdb = m_client[<span class="string">"nbsu"</span>]<span class="comment">#连接数据库，如果指定的数据库不存在，会自动创建一个</span></span><br></pre></td></tr></table></figure>

<h2 id="二、用python操作-MogoDb-的增删改查操作"><a href="#二、用python操作-MogoDb-的增删改查操作" class="headerlink" title="二、用python操作 MogoDb  的增删改查操作"></a>二、用python操作 MogoDb  的增删改查操作</h2><h3 id="2-1-增"><a href="#2-1-增" class="headerlink" title="2.1 增"></a>2.1 增</h3><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">res =mdb.info.insert([&#123;<span class="string">'name'</span>:<span class="string">'小铭同学'</span>&#125;,&#123;<span class="string">'name'</span>:<span class="string">'小雪'</span>&#125;])</span><br><span class="line">print(res) <span class="comment">#[ObjectId('5d2f1d3741ea8971fc7ec48d'), ObjectId('5d2f1d3741ea8971fc7ec48e')]</span></span><br><span class="line">res =mdb.info.insert_one(&#123;<span class="string">'name'</span>:<span class="string">'小铭同学'</span>&#125;)</span><br><span class="line">print(res.inserted_id)<span class="comment">#5d2f1dd0203c698a3a809f55</span></span><br><span class="line">res =mdb.info.insert_many([&#123;<span class="string">'name'</span>:<span class="string">'小铭同学'</span>&#125;,&#123;<span class="string">'name'</span>:<span class="string">'小雪'</span>&#125;])</span><br><span class="line">print(res.inserted_ids) <span class="comment">#[ObjectId('5d2f1dd0203c698a3a809f56'), ObjectId('5d2f1dd0203c698a3a809f57')]</span></span><br></pre></td></tr></table></figure>

<h3 id="2-2删"><a href="#2-2删" class="headerlink" title="2.2删"></a>2.2删</h3><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">res = mdb.info.delete_one(&#123;<span class="string">'name'</span>:<span class="string">'小雪'</span>&#125;)</span><br></pre></td></tr></table></figure>

<h3 id="2-3改"><a href="#2-3改" class="headerlink" title="2.3改"></a>2.3改</h3><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">res = mdb.info.update_one(&#123;<span class="string">'name'</span>:<span class="string">'小铭同学'</span>&#125;,&#123;<span class="string">'$set'</span>:&#123;<span class="string">"name"</span>:<span class="string">"hh"</span>&#125;&#125;)</span><br><span class="line"><span class="comment"># print(res.modified_count) #1</span></span><br><span class="line">user = mdb.info.find_one(&#123;<span class="string">'name'</span>:<span class="string">'小雪'</span>&#125;)</span><br><span class="line">user[<span class="string">'age'</span>] =<span class="number">19</span></span><br><span class="line">user[<span class="string">'hobby'</span>] =<span class="string">'读书'</span></span><br><span class="line"><span class="comment"># res= mdb.info.update_one(&#123;'name':'hh'&#125;,&#123;'$set':user&#125;)</span></span><br><span class="line">print(user)</span><br><span class="line">res= mdb.info.update_one(&#123;<span class="string">'name'</span>:<span class="string">'小雪'</span>&#125;,&#123;<span class="string">'$set'</span>:&#123;<span class="string">'hobby'</span>:user.get(<span class="string">'hobby'</span>)&#125;&#125;)</span><br></pre></td></tr></table></figure>

<h3 id="2-4查"><a href="#2-4查" class="headerlink" title="2.4查"></a>2.4查</h3><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">res =list(mdb.info.find())</span><br><span class="line">print(res)  <span class="comment">#[&#123;'_id': ObjectId('5d2f1c8d8c31a48691fbe63d'), 'name': '小铭同学'&#125;, &#123;'_id': ObjectId('5d2f1c8d8c31a48691fbe63e'), 'name': '小雪'&#125;]</span></span><br><span class="line"><span class="comment">#序列化的过程</span></span><br><span class="line"><span class="keyword">for</span> user <span class="keyword">in</span> res:</span><br><span class="line">    user[<span class="string">"_id"</span>] = str(user.get(<span class="string">"_id"</span>))</span><br><span class="line">res_json = json.dumps(res)</span><br></pre></td></tr></table></figure>

<h2 id="三、排序及分页"><a href="#三、排序及分页" class="headerlink" title="三、排序及分页"></a>三、排序及分页</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">res =mdb.info.find() </span><br><span class="line"><span class="comment"># res_list =list(res.sort('age',pymongo.DESCENDING))</span></span><br><span class="line"><span class="comment"># res_list =list(res.sort('age',pymongo.DESCENDING).limit(3))</span></span><br><span class="line">res_list =list(res.sort(<span class="string">'age'</span>,pymongo.DESCENDING).skip(<span class="number">2</span>))</span><br><span class="line"><span class="keyword">for</span> s <span class="keyword">in</span> res_list:</span><br><span class="line">     print(s)</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># 分页</span></span><br><span class="line">res = list(res.sort(<span class="string">"age"</span>,pymongo.ASCENDING).limit(<span class="number">2</span>).skip(<span class="number">4</span>))</span><br><span class="line">print(res)</span><br></pre></td></tr></table></figure>


      
    </div>
    
    
    

    

    

    
      <div>
        <ul class="post-copyright">
  <li class="post-copyright-author">
    <strong>本文作者：</strong>
    
  </li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    <a href="http://yoursite.com/2019/09/18/【数据库mogodb】python操作mogodb/" title="python操作MongoDB">http://yoursite.com/2019/09/18/【数据库mogodb】python操作mogodb/</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>
    本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/3.0/" rel="external nofollow" target="_blank">CC BY-NC-SA 3.0</a> 许可协议。转载请注明出处！
  </li>
</ul>

      </div>
    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/dxl/tags/数据库/" rel="tag"># 数据库</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/dxl/2019/09/18/【数据库mogodb】mogodb初识 /" rel="next" title="MongoDB初始">
                <i class="fa fa-chevron-left"></i> MongoDB初始
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/dxl/2019/09/20/【内容回顾】03-1python基础/" rel="prev" title="python基础">
                python基础 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  
    <div class="comments" id="comments">
    </div>
  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="/dxl/images/avatar.png" alt>
            
              <p class="site-author-name" itemprop="name"></p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/dxl/archives">
              
                  <span class="site-state-item-count">43</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/dxl/categories/index.html">
                  <span class="site-state-item-count">6</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/dxl/tags/index.html">
                  <span class="site-state-item-count">6</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          

          
          

          
          
            <div class="links-of-blogroll motion-element links-of-blogroll-inline">
              <div class="links-of-blogroll-title">
                <i class="fa  fa-fw fa-sign-out"></i>
                我的友链
              </div>
              <ul class="links-of-blogroll-list">
                
                  <li class="links-of-blogroll-item">
                    <a href="tencent://message/?Menu=yes&uin=1258517737&Site=QQ%E6%9E%81%E5%AE%A2&Service=300&sigT=45a1e5847943b64c6ff3990f8a9e644d2b31356cb0b4ac6b24663a3c8dd0f8aa12a595b1714f9d45/" title="申请坑位" target="_blank">申请坑位</a>
                  </li>
                
              </ul>
            </div>
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#一、模块的准备"><span class="nav-number">1.</span> <span class="nav-text">一、模块的准备</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-1模块的安装"><span class="nav-number">1.1.</span> <span class="nav-text">1.1模块的安装</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-2可能用到的相关模块"><span class="nav-number">1.2.</span> <span class="nav-text">1.2可能用到的相关模块</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#1-3数据库的连接"><span class="nav-number">1.3.</span> <span class="nav-text">1.3数据库的连接</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#二、用python操作-MogoDb-的增删改查操作"><span class="nav-number">2.</span> <span class="nav-text">二、用python操作 MogoDb  的增删改查操作</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#2-1-增"><span class="nav-number">2.1.</span> <span class="nav-text">2.1 增</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-2删"><span class="nav-number">2.2.</span> <span class="nav-text">2.2删</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-3改"><span class="nav-number">2.3.</span> <span class="nav-text">2.3改</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-4查"><span class="nav-number">2.4.</span> <span class="nav-text">2.4查</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#三、排序及分页"><span class="nav-number">3.</span> <span class="nav-text">三、排序及分页</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      
        <div class="back-to-top">
          <i class="fa fa-arrow-up"></i>
          
            <span id="scrollpercent"><span>0</span>%</span>
          
        </div>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-hand-peace-o"></i>
  </span>
  <span class="author" itemprop="copyrightHolder"></span>

  
</div>









        
<div class="busuanzi-count">
  <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv">
      本站访客数
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
      人次
    </span>
  

  
    <span class="site-pv">
      本站总访问量
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
      次
    </span>
  
</div>








        
      </div>
    </footer>

    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/dxl/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/dxl/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/dxl/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/dxl/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/dxl/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/dxl/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/dxl/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/dxl/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/dxl/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/dxl/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/dxl/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/dxl/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/dxl/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  










  <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
  <script src="//unpkg.com/valine/dist/Valine.min.js"></script>
  
  <script type="text/javascript">
    var GUEST = ['nick','mail','link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item=>{
      return GUEST.indexOf(item)>-1;
    });
    new Valine({
        el: '#comments' ,
        verify: false,
        notify: false,
        appId: '13B0JGDuA6ttduN8AQaR8CzF-gzGzoHsz',
        appKey: 'I13r9r5mVgq4jQYpYy6V4gW3',
        placeholder: '欢迎大佬指点~~~',
        avatar:'mm',
        guest_info:guest,
        pageSize:'10' || 10,
    });
  </script>



  





  

  

  

  
  

  

  

  

</body>
</html>
